import request from '@/utils/request'

// 获取备份列表
export function listBackups(userId) {
  return request({
    url: `/disk/storage/backups/${userId}`,
    method: 'get'
  })
}

// 获取备份文件列表
export function listBackupFiles(userId, backupId) {
  return request({
    url: `/disk/storage/backups/${userId}/${backupId}/files`,
    method: 'get'
  })
}

// 创建备份
export function createBackup(userId) {
  return request({
    url: `/disk/storage/backup/${userId}`,
    method: 'post'
  })
}

// 创建测试备份
export function createTestBackup(userId) {
  return request({
    url: `/disk/storage/create-test-backup/${userId}`,
    method: 'get'
  })
}

// 恢复文件
export function restoreFiles(data) {
  return request({
    url: '/disk/storage/restore',
    method: 'post',
    data: data
  })
} 